package com.zzzyh.forumsystemclient.services;

import com.zzzyh.forumsystemclient.model.ChatMsg;
import com.zzzyh.forumsystemclient.model.ChatRoom;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IChatService {
    List<ChatMsg> list(Integer pageNum, Integer pageSize,Integer roomId);

    Integer total();

    void send(@Param("chatMsg") ChatMsg chatMsg);

    List<Integer> getFriendsList(@Param("userID") Integer userID);

    List<ChatRoom> rooms(@Param("userID") Integer userID);

    ChatRoom roomWithFriend(Integer userId, Integer friendId);

    ChatMsg getLastMsg(Long roomId);

    void recallMsg(Integer id);

    Integer getUnreadCount(@Param("roomId") Long roomId, @Param("userID") Integer userID);

    void updateUnreadCount(@Param("roomId") Long roomId, @Param("userId") Integer userId, @Param("unreadCount") Integer unreadCount);

    List<Integer> getAdminFriendsList();
}
